#!/bin/bash 
# using a temporary directory

tempdir=$(mktemp -d dir.XXX)
cd $tempdir
tempfile1=$(mktemp abc.XXX)
tempfile2=$(mktemp cba.XXX)

exec 7>$tempfile1
exec 8>$tempfile2

echo "Send data to directory $tempdir"
echo "This is a test line of data for $tempfile1" >&7
echo "This is a test line of data for $tempfile2" >&8


exec 7>&-
exec 8>&-

